package cn.bdqn.common;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Result<T> {
    private Integer code;
    private String msg;
    private T data;
    public static <T> Result ok(T data) {
        return new Result(200, "成功", data);
    }
    public static <T> Result fail(Integer code,String msg,T data) {
        return new Result(code, msg, data);
    }
}
